package org.budo.jdbc.driver.resultset.impl;

import org.budo.jdbc.driver.BudoJdbcResultSetMetaData;

/**
 * 单列多行结果集
 * 
 * @author lmw
 */
public class ObjectArrayResultSet extends AbstractArrayResultSet<Object> {
    public ObjectArrayResultSet() {}

    public ObjectArrayResultSet(String[] columnNames, Object[] valueArray) {
        this.metaData(new BudoJdbcResultSetMetaData(columnNames));
        this.valueArray(valueArray);
    }

    @Override
    protected Object getCellValue(String columnLabel) {
        int rowNumber = this.rowNumber();
        return this.valueArray()[rowNumber];
    }
}
